﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using bmapi.Models.DataEntity;

namespace bmapi.Models
{
    public class ShowModel
    {
        #region 员工信息显示模板
        public class ShowStaffInfo : User
        {
            /// <summary>
            /// 工序名 
            /// </summary>
            public string ProcessName { get; set; }
            /// <summary>
            /// 流水线名称
            /// </summary>
            public string PLName { get; set; }
            public ShowStaffInfo() { }
            /// <summary>
            /// 个人信息 
            /// </summary>
            /// <param name="user"></param>
            /// <param name="codeName"></param>
            /// <param name="plName"></param>
            public ShowStaffInfo(User user, string codeName,string plName)
            {
                this.login_id = user.login_id;
                this.name = user.name;
                this.password = user.password;
                this.PLID = user.PLID;
                this.code = user.code;
                this.power = user.power;
                this.phone = user.phone;
                this.mail = user.mail;
                this.weixin = user.weixin;
                this.computer = user.computer;
                this.mach_id = user.mach_id;
                this.state = user.state;
                this.last_time = user.last_time;
                this.grouping = user.grouping;
                this.replace = user.replace;
                this.ProcessName = codeName;
                this.PLName = plName;
            }
           /// <summary>
           /// 员工信息
           /// </summary>
           /// <param name="user"></param>
           /// <param name="codeName"></param>
           
            public ShowStaffInfo(User user, string codeName)
            {
                this.login_id = user.login_id;
                this.name = user.name;
                this.password = user.password;
                this.PLID = user.PLID;
                this.code = user.code;
                this.power = user.power;
                this.phone = user.phone;
                this.mail = user.mail;
                this.weixin = user.weixin;
                this.computer = user.computer;
                this.mach_id = user.mach_id;
                this.state = user.state;
                this.last_time = user.last_time;
                this.grouping = user.grouping;
                this.replace = user.replace;
                this.ProcessName = codeName;
            }
        }
        #endregion 

        #region  生产单信息显示模板
        public class ShowOrderInfo
        {
            /// <summary>
            /// 生产单号
            /// </summary>
            public string OrderNo { get; set; }
            /// <summary>
            /// 样板名
            /// </summary>
            public string ModelName { get; set; }
            /// <summary>
            /// 客户/品牌  
            /// </summary>
            public string Brand { get; set; }
            /// <summary>
            /// 创建时间
            /// </summary>
            public DateTime CreateTime { get; set; }
            /// <summary>
            /// 产量
            /// </summary>
            public int Yield { get; set; }
            /// <summary>
            /// 床数
            /// </summary>
            public int BedQty { get; set; }
            /// <summary>
            /// 状态 (完成，禁用，当前工序)
            /// </summary>
            public int State { get; set; }
        }
        #endregion

        #region 床信息 
        public class BedInfo
        {
            /// <summary>
            /// 床名
            /// </summary>
            public string BedName { get; set; }
            /// <summary>
            /// 物料编码
            /// </summary>
            public string MaterialCode { get; set; }
            /// <summary>
            /// 长度
            /// </summary>
            public int BedLen { get; set; }
            /// <summary>
            /// 层数
            /// </summary>
            public int LayCount { get; set; }
            /// <summary>
            /// 料率  
            /// </summary>
            public double UC { get; set; }
        }
        #endregion

        #region 工序列表
        public class ProcessList
        {
            /// <summary>
            /// 工序编码
            /// </summary>
            public int Code { get; set; }
            /// <summary>
            /// 用户名(执行人)
            /// </summary>
            public string UserName { get; set; }
            /// <summary>
            /// 时间
            /// </summary>
            public DateTime CreateTime { get; set; }
            /// <summary>
            /// 工序状态  0完成  1废弃 
            /// </summary>
            public int State { get; set; }
            /// <summary>
            /// 工号
            /// </summary>
            public int loginid { get; set; }
        }

        #endregion

        #region 统计图
        //往年统计显示模板
        public class ShowCartogram
        {
            public int status { get; set; }
            public DataInfo data { get; set; }
        }
        public class DataInfo
        {
            public int total { get; set; }
            public List<string> legend { get; set; }
            public List<LegendInfo> series { get; set; }
        }
        public class LegendInfo
        {
            public string CompanyName { get; set; }
            public List<double> Data { get; set; }
        }
        public class Number
        {
            public object SumModel { get; set; }
            public object AvgModel { get; set; }
            public object SumOrder { get; set; }
            public object AvgOrder { get; set; }
            public object SumNumber { get; set; }
            public object AvgNumber { get; set; }
            public object SumBed { get; set; }
            public object AvgBed { get; set; }
            public object SumLen { get; set; }
            public object AvgLen { get; set; }
            public object SumPod { get; set; }
            public object AvgPod { get; set; }
        }

        //计件统计显示模板
        public class ShowPiece
        {
            public int status { get; set; }
            public Data data { get; set; }
        }
        public class Data
        {
            public int total { get; set; }
            public List<string> X { get; set; }
            public List<double> Y { get; set; }
            public List<int> code { get; set; }
        }

        //样板统计饼图模板
        public class PieModel
        {
            public int value { get; set; }
            public string name { get; set; }
        }
        //oracle样板统计饼图模板
        public class OrcPieModel
        {
            public decimal value { get; set; }
            public string name { get; set; }
        }
        #endregion

        #region  登录
        public class LoginData
        {
            public int status { get; set; }
            public string tip { get; set; }
            public LoginToken data { get; set; }
            public LoginData() { }
            public LoginData(int status, string tip, LoginToken da)
            {
                this.status = status;
                this.tip = tip;
                this.data = da;
            }
        }
        public class LoginToken
        {
            public int role { get; set; }
            public string token { get; set; }
            public LoginToken() { }
            public LoginToken(int role, string token)
            {
                this.role = role;
                this.token = token;
            }
        }
        #endregion

        #region 款式查询信息显示
        public class StyleInfo
        {
            /// <summary>
            /// 款名
            /// </summary>
            public string StyleName { get; set; }
            /// <summary>
            /// 样板名
            /// </summary>
            public string ModelName { get; set; }
            /// <summary>
            /// 品牌/客户
            /// </summary>
            public string Brand { get; set; }
            /// <summary>
            /// 服装分类名
            /// </summary>
            public string Type { get; set; }
            /// <summary>
            /// 创建时间
            /// </summary>
            public DateTime Time { get; set; }
            /// <summary>
            /// 状态
            /// </summary>
            public int State { get; set; }
            /// <summary>
            /// 款式Id
            /// </summary>
            public int StyleId { get; set; }
            /// <summary>
            /// 样板Id
            /// </summary>
            public int ModelId { get; set; }
            /// <summary>
            /// 存储模式 0普通 1加法  -1减法
            /// </summary>
            public int SaveModel { get; set; }

        }
        #endregion

        #region 生产单查询信息显示        

        public class ProductInfo
        {
            /// <summary>
            /// 订单ID 
            /// </summary>
            public int Id { get; set; }
            /// <summary>
            /// 生产单号
            /// </summary>
            public string OrderId { get; set; }
            /// <summary>
            /// 样板名
            /// </summary>
            public string ModelName { get; set; }
            /// <summary>
            /// 样板ID
            /// </summary>
            public int ModelId { get; set; }
            /// <summary>
            /// 客户/品牌
            /// </summary>
            public string ErpName { get; set; }
            /// <summary>
            /// 创建时间
            /// </summary>
            public DateTime Time { get; set; }
            /// <summary>
            /// 产量
            /// </summary>
            public int Yield { get; set; }
            /// <summary>
            /// 生产单状态
            /// </summary>
            public int State { get; set; }
            /// <summary>
            /// 生产单绑定id
            /// </summary>
            public int BindId { get; set; }
            /// <summary>
            /// 流水线类型
            /// </summary>
            public int type { get; set; }
        }

        public class OrcProductInfo:ProductInfo
        {
           
            /// <summary>
            /// 床数
            /// </summary>
            public decimal Bed { get; set; }
            /// <summary>
            /// 特体数
            /// </summary>
            public decimal Pod { get; set; }
        }
        public class SqlProductInfo : ProductInfo
        {

            /// <summary>
            /// 床数
            /// </summary>
            public int Bed { get; set; }
            /// <summary>
            /// 特体数
            /// </summary>
            public int Pod { get; set; }
        }

        #endregion

        #region  样板详情
        public class ModelInfo
        {
            /// <summary>
            /// 样板ID
            /// </summary>
            public int ModelId { get; set; }
            /// <summary>
            /// 图片扩展名
            /// </summary>
            public string Image { get; set; }
            /// <summary>
            /// 服装分类名
            /// </summary>
            public string Type { get; set; }
            /// <summary>
            /// 品牌/客户
            /// </summary>
            public string Brand { get; set; }
            /// <summary>
            /// 创建时间 
            /// </summary>
            public DateTime Time { get; set; }
        }
        #endregion

        #region 未处理订单提醒
        public class Message
        {
            /// <summary>
            /// 生产单名称
            /// </summary>
            public string name { get; set; }
            /// <summary>
            /// 生产单ID
            /// </summary>
            public int OrderId { get; set; }
            /// <summary>
            /// 生产单创建时间
            /// </summary>
            public DateTime CreateTime { get; set; }
        }
        #endregion

        #region ftp模板
        public class Ftp{
            /// <summary>
            /// ftp登录名
            /// </summary>
            public string username { get; set; }
            /// <summary>
            /// ftp登录密码
            /// </summary>
            public string newpassword { get; set; }
        } 
        #endregion

        #region
        public class PLShow
        {
            /// <summary>
            /// 流水线id
            /// </summary>
            public int id { get; set; }
            /// <summary>
            /// 流水线名称
            /// </summary>
            public string name { get; set; }
            /// <summary>
            /// 流水线类型
            /// </summary>
            public int type { get; set; }
            /// <summary>
            /// 大货流程结束之后，是否自动生成裁床流程
            /// </summary>
            public int autocreate { get; set; }
            /// <summary>
            /// 状态 
            /// </summary>
            public int state { get; set; }
            /// <summary>
            /// 流水线所属主管名称
            /// </summary>
            public string UserName { get; set; }
            /// <summary>
            /// 工号
            /// </summary>
            public int login_id { get; set; }
        }
        #endregion

        #region  pod详情 
        public class ShowPodInfo
        {
            public int Pod { get; set; }
            public string UserName { get; set; }
            public DateTime Time { get; set; }
            public int State { get; set; }
        }

        #endregion

        #region 查看日志
        public class CheckTask
        {
            public string Pc_Name { get; set; }
            public int Code { get; set; }
            public string UserName { get; set; }
            public DateTime time { get; set; }
        }
        #endregion

        #region  显示流水号信息
        public class ShowLSH
        {
            public string UserName { get; set; }
            public string OrderName { get; set; }
            public DateTime Time { get; set; }
            public int State { get; set; }
            public int Pod { get; set; }
        }


        #endregion

        #region 显示产量详情
        public class ShowProInfo
        {
            public string name { get; set; }
            public int lsh { get; set; }
            public int pod { get; set; }
        }
        #endregion
    }
}